# Contributor: Aiden Grossman <agrossman154@yahoo.com>
# Maintainer: Aiden Grossman <agrossman154@yahoo.com>
pkgname=jupyter-nbclassic
pkgver=1.0.0
pkgrel=1
pkgdesc="Jupyter notebook as jupyter server extension"
url="https://github.com/jupyter/nbclassic"
# s390x, ppc64le: no jupyter-server
arch="noarch !armhf !s390x !ppc64le"
license="BSD-3-Clause"
depends="py3-traitlets jupyter-server jupyter-notebook-shim"
makedepends="py3-gpep517 py3-jupyter-packaging"
checkdepends="py3-pytest py3-pytest-tornasync py3-pytest-jupyter"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/jupyter/nbclassic/releases/download/v$pkgver/nbclassic-$pkgver.tar.gz"
builddir="$srcdir/nbclassic-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
fc80cd6311ab9cac9e0fdcf4d37cffc383c90327da8c27901239b84486e4afe23372665b0e1464ec78845816e829c4f3cf8672b4a0ad7e396fdb962b2f4f5a1b  jupyter-nbclassic-1.0.0.tar.gz
"
